﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ueditorTest.aspx.cs" ValidateRequest="false" Inherits="Manage_ueditorTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>

    <script type="text/javascript" src="ueditor/editor_all.js"></script>

    <script type="text/javascript" src="ueditor/editor_all_min.js"></script>

    <script type="text/javascript" src="ueditor/editor_config.js"></script>

    <link rel="Stylesheet" type="text/css" href="ueditor/themes/default/ueditor.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="editorValuedate" runat="server" style="display: none;">
            <asp:TextBox ID="txt_Content" runat="server" TextMode="MultiLine" Text="owjfowfjow"></asp:TextBox>
        </div>
        <div name="editorValue" runat="server" id="editorValue" style="width:500px;">
        </div>
        
        <asp:Button ID="btnSubmit" runat="server" Text="点击我一下告诉你提交的内容" OnClick="btnSubmit_Click" />

        <script type="text/javascript">
            var val = document.getElementById("txt_Content").value;
            var editor = new baidu.editor.ui.Editor({
            toolbars: [['Paragraph', 'RowSpacing', 'FontFamily', 'FontSize', 'fullscreen']],
                minFrameHeight: "200",
                initialContent:val
                
            });
            editor.render("editorValue");
            editor.setContent($("#editorValuedata")[0].innerHTML);
            document.getElementById('editorValuedata').innerHTML = "";
            $("#editorValuedata").remove();
            var val = document.getElementById("txt_Content").value;
            //editor.setContent(val);
        </script>

    </div>
    </form>
</body>
</html>
